package com.financial.service.platbalancepay.intercepter;

import com.financial.service.platbalancepay.connector.PlatformPayFegin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class PlatfromIntercepter implements HandlerInterceptor {
	@Autowired
	PlatformPayFegin platformPayFegin;

	
	public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
			throws Exception {
		//根据平台标识获取
		int channelsId = platformPayFegin.getChannelsId(request.getParameter(""));
		//获取tooken
		int platfromId = platformPayFegin.getPlatfromId(request.getParameter(""));
		return true;
	}

	public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
                           ModelAndView modelAndView) throws Exception {
		
	}

	public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)
			throws Exception {
		
	}
	
	
}
